
ASTEROIDS AHEAD!
by Clyde Bish
from ZX Computing Apr/May.1983

Steer your spacecraft clear of the asteroids
in this exciting game from Mr. Bish of Exeter.


There you are, a lonely spaceship floating through space,
when suddenly your peace is shattered by a swarm of
asteroids bearing down on you at a great rate of knots. You
can manoeuvre your craft left using the '5' key or right
with the '8' key. You also possess an energy field which you
can use to deflect asteroids you cannot avoid, but beware of
running out of energy - the energy field has only a limited
strength and a short range.

User defined graphics have been used in this program for the
asteroids, the energy screen, the spacecraft and the
explosions. They are set during the initial display, thus
not causing an embarrassing pause during the game.

Logic lines have been used within the program. The most
well-known example of these are present in line 50, but you
may like to study the less popular conditional GO TO used in
line 405. Also, the use of ATTR to detect the presence of a
white asteroid in the path of the yellow spacecraft should
be noted; SCREEN$ (x,y) would not work with user defined
graphics.

Line 460, which goes to itself, is used to prevent a STOP
message from spoiling the appearance of the screen. Press
the Break key to stop the vicious circle.

It should also be noted that the capital letters within
quotes in lines 62, 100 and 400 are user defined graphics
and as such should be entered in Graphics mode.

The program is also equipped with a routine to give your
score and the best score achieved, and there is also a
best-ever score with the initials of the player who managed
to build up that score. To operate the best-ever score
option, enter:
	LET e=0
as a command, and then SAVE using:
	GO TO 430
The program, when LOADed, will GO TO line 1 and execute
itself, complete with variables.


--
Another Fine Product transcribed by:
Jim Grimwood (jimg@globalnet.co.uk), Weardale, England
--
